﻿/*
 * User: RSny
 * Date: 5/8/2012
 * Time: 2:38 PM
 */
using System;
using System.Management;
using System.Runtime.InteropServices;

using Aspects.PInvoke;

namespace Aspects.Unit
{
    public class NetworkPresenceInformation
    {
        /// <summary>
        /// Checks to see which wireless netowk Adapters are present in order from WPAN,WLAN,WWAN
        /// </summary>
        /// <returns>bool values for each device if they are present or not. WPAN,WLAN,WWAN is the order</returns>
        public static bool[] GetAdapatersPresent()
        {
            bool[] adapters = new bool[3];
            //WPAN
            adapters[0] = Native.IsDevicePresent("e0cbf06ccd8b4647bb8a263b43f0f974");
            //WLAN
            adapters[1] = Native.IsWifiPresent();
            //WWAN
            adapters[2] = Native.IsDevicePresent("4d36e96d-e325-11ce-bfc1-08002be10318");
            return adapters;
        }
    }
}